/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.crossriver.crgis.database.model.impl;

import com.crossriver.crgis.database.model.Property_Information;
import com.crossriver.crgis.database.model.Property_InformationModel;
import com.crossriver.crgis.database.model.Property_InformationSoap;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.impl.BaseModelImpl;

import java.io.Serializable;

import java.lang.reflect.Proxy;

import java.sql.Types;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * The base model implementation for the Property_Information service. Represents a row in the &quot;CRGIA_Property_Information&quot; database table, with each column mapped to a property of this class.
 *
 * <p>
 * This implementation and its corresponding interface {@link com.crossriver.crgis.database.model.Property_InformationModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link Property_InformationImpl}.
 * </p>
 *
 * <p>
 * Never modify or reference this class directly. All methods that expect a property_ information model instance should use the {@link com.crossriver.crgis.database.model.Property_Information} interface instead.
 * </p>
 *
 * @author Wole Adetiba
 * @see Property_InformationImpl
 * @see com.crossriver.crgis.database.model.Property_Information
 * @see com.crossriver.crgis.database.model.Property_InformationModel
 * @generated
 */
public class Property_InformationModelImpl extends BaseModelImpl<Property_Information>
	implements Property_InformationModel {
	public static final String TABLE_NAME = "CRGIA_Property_Information";
	public static final Object[][] TABLE_COLUMNS = {
			{ "applicationId", new Integer(Types.VARCHAR) },
			{ "userId", new Integer(Types.VARCHAR) },
			{ "propertyType", new Integer(Types.VARCHAR) },
			{ "blockNo", new Integer(Types.VARCHAR) },
			{ "plotNo", new Integer(Types.VARCHAR) },
			{ "area", new Integer(Types.DOUBLE) },
			{ "uom", new Integer(Types.VARCHAR) },
			{ "landLocation", new Integer(Types.VARCHAR) },
			{ "city", new Integer(Types.VARCHAR) },
			{ "state", new Integer(Types.VARCHAR) },
			{ "country", new Integer(Types.VARCHAR) },
			{ "origCofODate", new Integer(Types.TIMESTAMP) },
			{ "otherUsefulInformation", new Integer(Types.VARCHAR) },
			{ "allocationMadToYou", new Integer(Types.VARCHAR) },
			{ "assignedToYou", new Integer(Types.VARCHAR) },
			{ "locationType", new Integer(Types.VARCHAR) },
			{ "lga", new Integer(Types.VARCHAR) },
			{ "town", new Integer(Types.VARCHAR) },
			{ "village", new Integer(Types.VARCHAR) },
			{ "term", new Integer(Types.VARCHAR) },
			{ "estDevCost", new Integer(Types.VARCHAR) },
			{ "estStartDate", new Integer(Types.TIMESTAMP) }
		};
	public static final String TABLE_SQL_CREATE = "create table CRGIA_Property_Information (applicationId VARCHAR(75) not null primary key,userId VARCHAR(75) null,propertyType VARCHAR(75) null,blockNo VARCHAR(75) null,plotNo VARCHAR(75) null,area DOUBLE,uom VARCHAR(75) null,landLocation VARCHAR(75) null,city VARCHAR(75) null,state VARCHAR(75) null,country VARCHAR(75) null,origCofODate DATE null,otherUsefulInformation VARCHAR(75) null,allocationMadToYou VARCHAR(75) null,assignedToYou VARCHAR(75) null,locationType VARCHAR(75) null,lga VARCHAR(75) null,town VARCHAR(75) null,village VARCHAR(75) null,term VARCHAR(75) null,estDevCost VARCHAR(75) null,estStartDate DATE null)";
	public static final String TABLE_SQL_DROP = "drop table CRGIA_Property_Information";
	public static final String ORDER_BY_JPQL = " ORDER BY property_Information.applicationId ASC";
	public static final String ORDER_BY_SQL = " ORDER BY CRGIA_Property_Information.applicationId ASC";
	public static final String DATA_SOURCE = "liferayDataSource";
	public static final String SESSION_FACTORY = "liferaySessionFactory";
	public static final String TX_MANAGER = "liferayTransactionManager";
	public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.entity.cache.enabled.com.crossriver.crgis.database.model.Property_Information"),
			true);
	public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.finder.cache.enabled.com.crossriver.crgis.database.model.Property_Information"),
			true);

	/**
	 * Converts the soap model instance into a normal model instance.
	 *
	 * @param soapModel the soap model instance to convert
	 * @return the normal model instance
	 */
	public static Property_Information toModel(
		Property_InformationSoap soapModel) {
		Property_Information model = new Property_InformationImpl();

		model.setApplicationId(soapModel.getApplicationId());
		model.setUserId(soapModel.getUserId());
		model.setPropertyType(soapModel.getPropertyType());
		model.setBlockNo(soapModel.getBlockNo());
		model.setPlotNo(soapModel.getPlotNo());
		model.setArea(soapModel.getArea());
		model.setUom(soapModel.getUom());
		model.setLandLocation(soapModel.getLandLocation());
		model.setCity(soapModel.getCity());
		model.setState(soapModel.getState());
		model.setCountry(soapModel.getCountry());
		model.setOrigCofODate(soapModel.getOrigCofODate());
		model.setOtherUsefulInformation(soapModel.getOtherUsefulInformation());
		model.setAllocationMadToYou(soapModel.getAllocationMadToYou());
		model.setAssignedToYou(soapModel.getAssignedToYou());
		model.setLocationType(soapModel.getLocationType());
		model.setLga(soapModel.getLga());
		model.setTown(soapModel.getTown());
		model.setVillage(soapModel.getVillage());
		model.setTerm(soapModel.getTerm());
		model.setEstDevCost(soapModel.getEstDevCost());
		model.setEstStartDate(soapModel.getEstStartDate());

		return model;
	}

	/**
	 * Converts the soap model instances into normal model instances.
	 *
	 * @param soapModels the soap model instances to convert
	 * @return the normal model instances
	 */
	public static List<Property_Information> toModels(
		Property_InformationSoap[] soapModels) {
		List<Property_Information> models = new ArrayList<Property_Information>(soapModels.length);

		for (Property_InformationSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}

	public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
				"lock.expiration.time.com.crossriver.crgis.database.model.Property_Information"));

	public Property_InformationModelImpl() {
	}

	public String getPrimaryKey() {
		return _applicationId;
	}

	public void setPrimaryKey(String pk) {
		setApplicationId(pk);
	}

	public Serializable getPrimaryKeyObj() {
		return _applicationId;
	}

	public String getApplicationId() {
		if (_applicationId == null) {
			return StringPool.BLANK;
		}
		else {
			return _applicationId;
		}
	}

	public void setApplicationId(String applicationId) {
		_applicationId = applicationId;
	}

	public String getUserId() {
		if (_userId == null) {
			return StringPool.BLANK;
		}
		else {
			return _userId;
		}
	}

	public void setUserId(String userId) {
		_userId = userId;
	}

	public String getPropertyType() {
		if (_propertyType == null) {
			return StringPool.BLANK;
		}
		else {
			return _propertyType;
		}
	}

	public void setPropertyType(String propertyType) {
		_propertyType = propertyType;
	}

	public String getBlockNo() {
		if (_blockNo == null) {
			return StringPool.BLANK;
		}
		else {
			return _blockNo;
		}
	}

	public void setBlockNo(String blockNo) {
		_blockNo = blockNo;
	}

	public String getPlotNo() {
		if (_plotNo == null) {
			return StringPool.BLANK;
		}
		else {
			return _plotNo;
		}
	}

	public void setPlotNo(String plotNo) {
		_plotNo = plotNo;
	}

	public Double getArea() {
		return _area;
	}

	public void setArea(Double area) {
		_area = area;
	}

	public String getUom() {
		if (_uom == null) {
			return StringPool.BLANK;
		}
		else {
			return _uom;
		}
	}

	public void setUom(String uom) {
		_uom = uom;
	}

	public String getLandLocation() {
		if (_landLocation == null) {
			return StringPool.BLANK;
		}
		else {
			return _landLocation;
		}
	}

	public void setLandLocation(String landLocation) {
		_landLocation = landLocation;
	}

	public String getCity() {
		if (_city == null) {
			return StringPool.BLANK;
		}
		else {
			return _city;
		}
	}

	public void setCity(String city) {
		_city = city;
	}

	public String getState() {
		if (_state == null) {
			return StringPool.BLANK;
		}
		else {
			return _state;
		}
	}

	public void setState(String state) {
		_state = state;
	}

	public String getCountry() {
		if (_country == null) {
			return StringPool.BLANK;
		}
		else {
			return _country;
		}
	}

	public void setCountry(String country) {
		_country = country;
	}

	public Date getOrigCofODate() {
		return _origCofODate;
	}

	public void setOrigCofODate(Date origCofODate) {
		_origCofODate = origCofODate;
	}

	public String getOtherUsefulInformation() {
		if (_otherUsefulInformation == null) {
			return StringPool.BLANK;
		}
		else {
			return _otherUsefulInformation;
		}
	}

	public void setOtherUsefulInformation(String otherUsefulInformation) {
		_otherUsefulInformation = otherUsefulInformation;
	}

	public String getAllocationMadToYou() {
		if (_allocationMadToYou == null) {
			return StringPool.BLANK;
		}
		else {
			return _allocationMadToYou;
		}
	}

	public void setAllocationMadToYou(String allocationMadToYou) {
		_allocationMadToYou = allocationMadToYou;
	}

	public String getAssignedToYou() {
		if (_assignedToYou == null) {
			return StringPool.BLANK;
		}
		else {
			return _assignedToYou;
		}
	}

	public void setAssignedToYou(String assignedToYou) {
		_assignedToYou = assignedToYou;
	}

	public String getLocationType() {
		if (_locationType == null) {
			return StringPool.BLANK;
		}
		else {
			return _locationType;
		}
	}

	public void setLocationType(String locationType) {
		_locationType = locationType;
	}

	public String getLga() {
		if (_lga == null) {
			return StringPool.BLANK;
		}
		else {
			return _lga;
		}
	}

	public void setLga(String lga) {
		_lga = lga;
	}

	public String getTown() {
		if (_town == null) {
			return StringPool.BLANK;
		}
		else {
			return _town;
		}
	}

	public void setTown(String town) {
		_town = town;
	}

	public String getVillage() {
		if (_village == null) {
			return StringPool.BLANK;
		}
		else {
			return _village;
		}
	}

	public void setVillage(String village) {
		_village = village;
	}

	public String getTerm() {
		if (_term == null) {
			return StringPool.BLANK;
		}
		else {
			return _term;
		}
	}

	public void setTerm(String term) {
		_term = term;
	}

	public String getEstDevCost() {
		if (_estDevCost == null) {
			return StringPool.BLANK;
		}
		else {
			return _estDevCost;
		}
	}

	public void setEstDevCost(String estDevCost) {
		_estDevCost = estDevCost;
	}

	public Date getEstStartDate() {
		return _estStartDate;
	}

	public void setEstStartDate(Date estStartDate) {
		_estStartDate = estStartDate;
	}

	public Property_Information toEscapedModel() {
		if (isEscapedModel()) {
			return (Property_Information)this;
		}
		else {
			return (Property_Information)Proxy.newProxyInstance(Property_Information.class.getClassLoader(),
				new Class[] { Property_Information.class },
				new AutoEscapeBeanHandler(this));
		}
	}

	public Object clone() {
		Property_InformationImpl property_InformationImpl = new Property_InformationImpl();

		property_InformationImpl.setApplicationId(getApplicationId());

		property_InformationImpl.setUserId(getUserId());

		property_InformationImpl.setPropertyType(getPropertyType());

		property_InformationImpl.setBlockNo(getBlockNo());

		property_InformationImpl.setPlotNo(getPlotNo());

		property_InformationImpl.setArea(getArea());

		property_InformationImpl.setUom(getUom());

		property_InformationImpl.setLandLocation(getLandLocation());

		property_InformationImpl.setCity(getCity());

		property_InformationImpl.setState(getState());

		property_InformationImpl.setCountry(getCountry());

		property_InformationImpl.setOrigCofODate(getOrigCofODate());

		property_InformationImpl.setOtherUsefulInformation(getOtherUsefulInformation());

		property_InformationImpl.setAllocationMadToYou(getAllocationMadToYou());

		property_InformationImpl.setAssignedToYou(getAssignedToYou());

		property_InformationImpl.setLocationType(getLocationType());

		property_InformationImpl.setLga(getLga());

		property_InformationImpl.setTown(getTown());

		property_InformationImpl.setVillage(getVillage());

		property_InformationImpl.setTerm(getTerm());

		property_InformationImpl.setEstDevCost(getEstDevCost());

		property_InformationImpl.setEstStartDate(getEstStartDate());

		return property_InformationImpl;
	}

	public int compareTo(Property_Information property_Information) {
		int value = 0;

		value = getApplicationId()
					.compareTo(property_Information.getApplicationId());

		if (value != 0) {
			return value;
		}

		return 0;
	}

	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		Property_Information property_Information = null;

		try {
			property_Information = (Property_Information)obj;
		}
		catch (ClassCastException cce) {
			return false;
		}

		String pk = property_Information.getPrimaryKey();

		if (getPrimaryKey().equals(pk)) {
			return true;
		}
		else {
			return false;
		}
	}

	public int hashCode() {
		return getPrimaryKey().hashCode();
	}

	public String toString() {
		StringBundler sb = new StringBundler(45);

		sb.append("{applicationId=");
		sb.append(getApplicationId());
		sb.append(", userId=");
		sb.append(getUserId());
		sb.append(", propertyType=");
		sb.append(getPropertyType());
		sb.append(", blockNo=");
		sb.append(getBlockNo());
		sb.append(", plotNo=");
		sb.append(getPlotNo());
		sb.append(", area=");
		sb.append(getArea());
		sb.append(", uom=");
		sb.append(getUom());
		sb.append(", landLocation=");
		sb.append(getLandLocation());
		sb.append(", city=");
		sb.append(getCity());
		sb.append(", state=");
		sb.append(getState());
		sb.append(", country=");
		sb.append(getCountry());
		sb.append(", origCofODate=");
		sb.append(getOrigCofODate());
		sb.append(", otherUsefulInformation=");
		sb.append(getOtherUsefulInformation());
		sb.append(", allocationMadToYou=");
		sb.append(getAllocationMadToYou());
		sb.append(", assignedToYou=");
		sb.append(getAssignedToYou());
		sb.append(", locationType=");
		sb.append(getLocationType());
		sb.append(", lga=");
		sb.append(getLga());
		sb.append(", town=");
		sb.append(getTown());
		sb.append(", village=");
		sb.append(getVillage());
		sb.append(", term=");
		sb.append(getTerm());
		sb.append(", estDevCost=");
		sb.append(getEstDevCost());
		sb.append(", estStartDate=");
		sb.append(getEstStartDate());
		sb.append("}");

		return sb.toString();
	}

	public String toXmlString() {
		StringBundler sb = new StringBundler(70);

		sb.append("<model><model-name>");
		sb.append("com.crossriver.crgis.database.model.Property_Information");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>applicationId</column-name><column-value><![CDATA[");
		sb.append(getApplicationId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>userId</column-name><column-value><![CDATA[");
		sb.append(getUserId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>propertyType</column-name><column-value><![CDATA[");
		sb.append(getPropertyType());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>blockNo</column-name><column-value><![CDATA[");
		sb.append(getBlockNo());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>plotNo</column-name><column-value><![CDATA[");
		sb.append(getPlotNo());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>area</column-name><column-value><![CDATA[");
		sb.append(getArea());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>uom</column-name><column-value><![CDATA[");
		sb.append(getUom());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>landLocation</column-name><column-value><![CDATA[");
		sb.append(getLandLocation());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>city</column-name><column-value><![CDATA[");
		sb.append(getCity());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>state</column-name><column-value><![CDATA[");
		sb.append(getState());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>country</column-name><column-value><![CDATA[");
		sb.append(getCountry());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>origCofODate</column-name><column-value><![CDATA[");
		sb.append(getOrigCofODate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>otherUsefulInformation</column-name><column-value><![CDATA[");
		sb.append(getOtherUsefulInformation());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>allocationMadToYou</column-name><column-value><![CDATA[");
		sb.append(getAllocationMadToYou());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>assignedToYou</column-name><column-value><![CDATA[");
		sb.append(getAssignedToYou());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>locationType</column-name><column-value><![CDATA[");
		sb.append(getLocationType());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>lga</column-name><column-value><![CDATA[");
		sb.append(getLga());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>town</column-name><column-value><![CDATA[");
		sb.append(getTown());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>village</column-name><column-value><![CDATA[");
		sb.append(getVillage());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>term</column-name><column-value><![CDATA[");
		sb.append(getTerm());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>estDevCost</column-name><column-value><![CDATA[");
		sb.append(getEstDevCost());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>estStartDate</column-name><column-value><![CDATA[");
		sb.append(getEstStartDate());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private String _applicationId;
	private String _userId;
	private String _propertyType;
	private String _blockNo;
	private String _plotNo;
	private Double _area;
	private String _uom;
	private String _landLocation;
	private String _city;
	private String _state;
	private String _country;
	private Date _origCofODate;
	private String _otherUsefulInformation;
	private String _allocationMadToYou;
	private String _assignedToYou;
	private String _locationType;
	private String _lga;
	private String _town;
	private String _village;
	private String _term;
	private String _estDevCost;
	private Date _estStartDate;
}